<p>A couple <code>Collection</code> methods can be called with arguments of an incorrect type, but doing so is pointless and likely the result of
using the wrong argument. This rule will raise an issue when the type of the argument to <code>List.contains</code> or <code>List.remove</code> is
unrelated to the type used for the list declaration.</p>
<h2>Noncompliant Code Example</h2>
<pre>
List&lt;String&gt; list = new ArrayList&lt;String&gt;();
Integer integer = Integer.valueOf(1);

if (list.contains(integer)) {  // Noncompliant. Always false.
  list.remove(integer); // Noncompliant. list.add(integer) doesn't compile, so this will always return false
}
</pre>
<h2>See</h2>
<ul>
  <li> <a href="https://www.securecoding.cert.org/confluence/x/QwFlAQ">CERT, EXP04-J.</a> - Do not pass arguments to certain Java Collections
  Framework methods that are a different type than the collection parameter type </li>
</ul>

